package com.yonyou.lexue.lexuemgr.service.note;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.yonyou.lexue.lexuemgr.entity.Note;
import com.yonyou.lexue.lexuemgr.repository.NoteDao;

@Component
@Transactional
public class NoteService {

	@Autowired
	private NoteDao noteDao;
	
	public void saveNote(Note entity) {
		noteDao.save(entity);
	}
	
	public List<Note> getNotes(String userId,String courseId) {
		return noteDao.findByUserIdAndCourseId(userId, courseId);
	}
	
	
}
